package net.wangds.common.base.module;

public class Holder<T> {

    public static <T> Holder<T> of(T t){
        return new Holder<>(t);
    }

    public static <T> Holder<T> empty(){
        return new Holder<>();
    }

    public T target;

    public Holder(){
    }

    public Holder(T t){
        this.target = t;
    }

    public T update(T target){
        return this.target = target;
    }

    public boolean isEmpty(){
        return this.target==null;
    }
}
